# 条件语句while
i = 1
while i <= 5:
    print("今天星期:", i)
    i = i+1
a = 1
while a <= 100:
    print("今天是第：", a)
    a = a+1
# 计算
n = 1
s = 0
while n <= 100:
    s = s+n
    n = n+1
    print(s)
# 遍历循环for
for i in [1, 2, 3, 4, 5]:
    print(i)
# range内置函数
for i in range(10):
    print(i)
    print()
# while中嵌入while进行表示
i = 1
while i <= 5:
    print("上班时间为：", i)
    i = i+1
    t = 9
    while t <= 17:
        print("时间段：", t, end="   ")
        t = t+1
    print()
# for中嵌入for进行表示
for i in range(1, 6):
    print("上班星期为：", i)
    t = 9
    for t in range(9, 18):
        print("时间段：", t, end="   ")
    print()
# 九九乘法表while嵌套
i = 1
while i <= 9:
    j = 1
    while j <= i:
        print("%d*%d=%d" % (j, i, j*i), end="  ")
        j = j+1
    print()
    i = i+1
# 九九乘法表for嵌套
for i in range(1, 10):
    for j in range(1, i+1):
        print("%d*%d=%d" % (j, i, j*i), end="  ")
    print()
